# with open("./ssoFiles.csv", "r", encoding="utf-8") as f:
#     info = f.readlines()
#     print(info)

import time
import os
import csv
from multiprocessing import Pool

path = "D:\\Codes\\SsoCreate\\"
files = os.listdir(path)


def function(i):
    list = []
    with open(path + str(i), encoding="utf-8") as f:
        reader = csv.reader(f)
        for row in reader:
            list.append(row)
    print(len(list))
    print(time.ctime())


if __name__ == "__main__":
    # p = Pool(4)
    # for i in files:
    #     p.apply_async(function, args=(i,))
    # p.close()
    # p.join()
    # os.makedirs("D:\\Codes\\SsoCreate\\CreateSsoFile\\sso\\2019ydldldc_00GJ\\66\\6608\\660807\\660807511\\660807511515\\660807511515001")

    with open("D:\Codes\SsoCreate\ssoFiles.csv", "w", encoding="utf-8") as f:
        f.write("path,regioncode,username,password\n")
        for i in range(1000):
            f.write(f"sso/2019ydldldc_00GJ/66/6608/660807/660807511/660807511515/660807511515{i},660807511515{i},user{i},a\n")
